<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>@yield('pageTitle','')</title>
    <meta name="keywords" content="@yield('pageKeywords','')">
    <meta name="description" content="@yield('pageDescription','')">
    <link rel="stylesheet" href="@asset('vendor/BlogThemeLightA/static/css/bootstrap.css')">
    <link rel="stylesheet" href="@asset('vendor/BlogThemeLightA/static/css/style.css')">
    <link rel="stylesheet" href="@asset('asset/font-awesome/css/font-awesome.min.css')">
</head>
<body style="transform: none; position: relative;">
<div class="header">
    <div class="container-xxl">
        <div class="header-wrap">
            <div class="logo">
                <a href="{{modstart_web_url('')}}">
                    <img src="{{ modstart_config_asset_url('siteLogo') }}"/>
                </a>
            </div>
            <div class="menu">
                <ul class="nav-text">
                    @foreach(\MNav::all('head') as $nav)
                        @if(empty($nav['_child']))
                            <li><a href="{{ $nav['link'] }}">{{ $nav['name'] }}</a></li>
                        @else
                            <li class="dropdown">
                                <a href="{{$nav['link']}}">{{$nav['name']}}</a>
                                <div class="dropdown-text">
                                    @foreach($nav['_child'] as $child)
                                        <a href="{{$child['link']}}">{{$child['name']}}</a>
                                @endforeach
                            </li>
                        @endif
                    @endforeach
                </ul>
            </div>
            <div class="header-tool">
                <div class="search">
                    <a href="JavaScript:;" data-bs-toggle="offcanvas" data-bs-target="#search">搜索</a>
                </div>
                @if(modstart_module_enabled('Member'))
                    <div class="user">
                        <div class="login">
                            <div class="account">
                                <a href="JavaScript:;" class="portrait">
                                    <img src="{{$_memberUser['avatar']}}" />
                                </a>
                                <div class="user-body">
                                    <div class="user-head">
                                        <img src="{{$_memberUser['avatar']}}" />
                                        <div class="user-name">
                                            @if(\Module\Member\Auth\MemberUser::isLogin())
                                                <h2>{{$_memberUser['nickname']}}</h2>
                                                <p>欢迎登录</p>
                                            @else
                                                <h2>您还没有登录</h2>
                                                <p>登录之后可以开启更多功能哦</p>
                                            @endif
                                        </div>
                                    </div>
                                    <div class="user-btn">
                                        @if(\Module\Member\Auth\MemberUser::isLogin())
                                            <a href="{{modstart_web_url('member')}}">
                                                用户中心
                                            </a>
                                            <a href="{{modstart_web_url('logout')}}">
                                                退出登录
                                            </a>
                                        @else
                                            <a href="{{modstart_web_url('login')}}">
                                                <i></i>登 录
                                            </a>
                                            <a href="{{modstart_web_url('register')}}">
                                                <i></i>注 册
                                            </a>
                                        @endif
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                @endif
                <div class="m-btn">
                    <a href="JavaScript:;" id="navToggle"><i></i></a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="header-m">
    <div class="close">
        <img src="@asset('vendor/BlogThemeLightA/static/image/close.svg')" alt="关闭导航">
    </div>
    <div class="m-menu">
        <ul class="m-nav-text">
            @foreach(\MNav::all('head') as $nav)
                @if(empty($nav['_child']))
                    <li><a href="{{ $nav['link'] }}">{{ $nav['name'] }}</a></li>
                @else
                    <li class="dropdown">
                        <a href="{{$nav['link']}}">{{$nav['name']}}</a>
                        <div class="dropdown-text">
                            @foreach($nav['_child'] as $child)
                                <a href="{{$child['link']}}">{{$child['name']}}</a>
                        @endforeach
                    </li>
                @endif
            @endforeach
        </ul>
    </div>
</div>

@section('bodyContent')@show


<div class="bottom">
    <div class="container-xxl">
        <div class="bottom-body">
            <div class="menu">
                @foreach(\MNav::all('foot') as $nav)
                    <span>
                        <a href="{{ $nav['link'] }}">{{ $nav['name'] }}</a>
                    </span>
                @endforeach
            </div>
            <div class="copyright">
                <a href="http://beian.miit.gov.cn" target="_blank">
                    {{modstart_config('siteBeian','[网站备案信息]')}}
                </a>
                @if(modstart_config('siteBeianGonganText'))
                    <a href="{{modstart_config('siteBeianGonganLink')}}" target="_blank">
                        <img src="@asset('vendor/Site/image/gongan.png')" />
                        {{modstart_config('siteBeianGonganText')}}
                    </a>
                    @endif
                    &copy;{{modstart_config('siteDomain')}}
            </div>
        </div>
    </div>
</div>

<div class="offcanvas offcanvas-center eject-srarch" tabindex="-1" id="search" aria-labelledby="offcanvasTopLabel">
    <div class="container-xxl">
        <div class="offcanvas-header">
            <h3 class="offcanvas-title">搜 索</h3>
            <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
        </div>
        <div class="offcanvas-body">
            <div class="offcanvas-srarch">
                <div class="form">
                    <form name="keyform" method="get" action="{{modstart_web_url('blogs')}}">
                        <input type="text" name="keywords" placeholder="善用搜索才能事半功倍...">
                        <button type="submit"><i></i>搜 索</button>
                    </form>
                </div>
                @if(modstart_module_enabled('HotSearch'))
                    <div class="search-tag">
                        <ul>
                            @foreach(\Module\HotSearch\Util\HotSearchUtil::hotKeywords() as $hk)
                                <li>
                                    <a href="{{modstart_web_url('search',['keywords'=>$hk['keywords']])}}">
                                        {{$hk['keywords']}}
                                    </a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                @endif
            </div>
        </div>
    </div>
</div>
<div class="tool-top"><a id="scrollUp" href="#top"></a></div>
<script src="@asset('vendor/BlogThemeLightA/static/js/jquery.min.js')"></script>
<script src="@asset('vendor/BlogThemeLightA/static/js/bootstrap.bundle.js')"></script>
<script src="@asset('vendor/BlogThemeLightA/static/js/scrollUp.js')"></script>
<script src="@asset('vendor/BlogThemeLightA/static/js/theme.js')"></script>
<script src="@asset('vendor/BlogThemeLightA/static/js/theia.sticky.js')"></script>
</body>
</html>
